package l1j.server.server.clientpackets;

import l1j.server.echo.ClientThread;
import l1j.server.server.model.Instance.L1PcInstance;
import l1j.server.server.serverpackets.S_FixWeaponList;

import java.util.logging.Level;
import java.util.logging.Logger;
// Referenced classes of package l1j.server.server.clientpackets:
// ClientBasePacket

/**
 * 處理收到由客戶端傳來要求修復武器清單的封包
 */
public class C_FixWeaponList extends ClientBasePacket {

	private static final String C_FIX_WEAPON_LIST = "[C] C_FixWeaponList";
	private static final Logger _log = Logger.getLogger(C_FixWeaponList.class.getName());
	@Override
	public String getType() {
		return C_FIX_WEAPON_LIST;
	}

	@Override
	public void start(final byte[] decrypt, final ClientThread client) {
		try {
			// 資料載入
			this.read(decrypt);
		final L1PcInstance pc = client.getActiveChar();
		if (pc == null) {
			return;
		}
		pc.sendPackets(new S_FixWeaponList(pc));
	} catch (final Exception e) {
		_log.log(Level.SEVERE, e.getLocalizedMessage(), e);

	} finally {
		this.over();
	}
	}

}
